import http from '_u/http';

export default {
    getDiscussionList: (params) => {
        return http.get('/community/topic/page', {params});
    },
    getCourseDiscussionList: (params) => {
        return http.get('/discuss/queryByCourseId', {
            params
        });
    },
    getDiscussionDetail: (params) => {
        return http.get('/discuss/query', {
            params
        });
    },
    discussCommentPage:(params) => {
        return http.get('/course/comment/discussCommentPage', {params}
        );
    },




    postDiscussion: (data) => {
        return http.post('/discussion/post', data);
    },
    updateDiscussion: (data) => {
        return http.put('/discussion/update', data);
    },
    deleteDiscussion: (discussionId) => {
        return http.delete('/discussion/delete', {
            params: {
                discussionId
            }
        });
    }
}
